<!-- <template>
  <div v-highlight>
    <button @click="t1">t1</button>
    <button @click="t2">t2</button>
    <codemirror
      v-model="item"
      :options="cmOption"
      class="code-mirror"
      @ready="onCmReady3"
      @focus="onCmFocus"
      @input="onCmCodeChange"
      ref="myCmGenerate"
    ></codemirror>
  </div>
</template>
  
  <script>
import { Codemirror } from "vue-codemirror";

//   import { javascript } from "@codemirror/lang-javascript";
//   import { oneDark } from "@codemirror/theme-one-dark";
export default {
  components: {
    Codemirror,
  },
  data() {
    return {
      item: `### 运行c++程序

1.  touch test.cpp	创建cpp文件
2.  vim test.cpp        编写cpp文件
3.  按ESC退出，输入:wq保存
4.  g++ test.cpp -o test      命令生成一个test.out可执行程序
5.  ./test 运行可执行文件,./不能省略，表示是当前文件夹中的命令

### 从Linux服务器上获取文件：

pscp root@121.5.52.229:/root/lab2/t.cpp D:/

test

`,
      cmOptions: {
        // 语言及语法模式
        mode: "text/x-sql",
        // 主题
        theme: "idea",
        // 显示函数
        line: true,
        lineNumbers: true,
        // 软换行
        lineWrapping: true,
        // tab宽度
        tabSize: 4,
      },
    };
  },
  methods: {
    t1() {
      this.item = "321";
    },
    t2() {
      console.log(this.item);
    },
  },
};
</script> -->
<template>
  <div style="margin: 30%">
    <span>
      <el-button
        type="info"
        style="width: auto; position: relative; text-align: left"
      >
        <svg
          aria-hidden="true"
          height="16"
          viewBox="0 0 16 16"
          width="16"
          style="position: relative; left: -5px"
        >
          <path
            fill-rule="evenodd"
            d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"
          ></path>
        </svg>
        <font color="black"> Fork </font>

        <el-avatar :size="30" style="position: relative; left: 8px"
          ><font color="orange">1</font></el-avatar
        >
      </el-button>
    </span>
  </div>
</template>
<style></style>
